package service.impl;

import dao.RepairDao;
import dao.impl.RepairDaoImpl;
import entity.Baoxiu;
import service.RepairService;

import javax.naming.NamingException;
import java.sql.SQLException;
import java.util.List;

public class RepairServiceImpl implements RepairService {
    RepairDao dao = new RepairDaoImpl();


    @Override
    public int getTotalCount(Integer id, String roomNumber) throws SQLException, NamingException, ClassNotFoundException {
        return dao.getTotalCount(id, roomNumber);
    }

    @Override
    public List<Baoxiu> chaxun(Integer id, String roomNumber, int page, int pageSize) throws SQLException, NamingException, ClassNotFoundException {
        return dao.chaxun(id, roomNumber, page, pageSize);
    }

    @Override
    public int tianjia(Baoxiu baoxiu) throws SQLException, NamingException, ClassNotFoundException {
        return dao.tianjia(baoxiu);
    }


    @Override
    public Integer tjpd(Baoxiu baoxiu) throws SQLException, ClassNotFoundException {
        return dao.tjpd(baoxiu);
    }

    @Override
    public int updateStatus(int orderId, String status, String processAt, String completedAt) throws SQLException, NamingException, ClassNotFoundException {
        return dao.updateStatus(orderId, status, processAt, completedAt);
    }
}
